home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_2
/
guispell-1.0
/
rexx
/
ced
/
quickwordspell.ced
next >
Wrap
Text File
|
1992-03-25
|
2KB
|
65 lines
/*
* QuickWordSpell.ced - ARexx Program to spell check a word while in CED!
* Requires ISpell version 3.1ljr (or later) with ARexx Server Mode,
* GUISpell version 1.0, CED version 2.12 and PingServer (from VLT).
*
* This version just looks for GUISpell if the word is not found.
* This version can be used to setup a spell check as you type
* system under CED and possibly other text editors. Under CED,
* just define a macro for the space bar. Have the macro perform
* the following: `Send Dos/ARexx command...' QuickWordSpell, space.
*
* Started around: Sat Jan 05 03:51:37 1991 LJR
* Hacked on a bit: Thu Jan 17 17:17:26 1991 LJR
* Finished: Fri Feb 1 06:41:08 1991 LJR
* Updated for OS 2.04: LJR Sat Nov 23 17:40:36 1991
* Updated for IGadSpell: LJR Sun Dec 8 07:19:48 1991
* Reworked for GUISpell public release: Thu Mar 26 02:12:39 1992 LJR
* Copyright © 1991 Loren J. Rittle
* Use as you will, just document your changes and keep my copyright
* notice intact.
*
* Loren J. Rittle
* l-rittle@uiuc.edu
*/
options results
if pos('IRexxSpell',(show(ports))) = 0 then do
address command 'run <nil: >nil: ispell -r <nil: >nil:'
address command waitforport 'IRexxSpell'
end
status 87; bytepos = result;
status 55; line = result;
parse var line curline '0a'x
curpos = 0
do forever
curpos=pos('09'x, curline, curpos+1)
if curpos == 0 then break
curline = overlay(' ', curline, curpos)
end
do i = 1 to words(curline)
if wordindex(curline, i)-1 > bytepos then
break
end
item = compress( word( curline, i-1 ), ' ~`,./<>?;:"[]{}!@#$%^&*()+|=\' )
if item = '' then exit
address 'IRexxSpell' quickcheck item
if result = 'bad' then do
/* Uncomment the following if you want QuickWordSpell.ced to fire up
GUISpell on a spelling error. */
/* if pos('GUISpell',(show(ports))) = 0 then do
address command 'run <nil: >nil: GUISpell <nil: >nil:'
address command waitforport 'GUISpell'
end*/
if pos('GUISpell',(show(ports))) ~= 0 then
address 'GUISpell' check item
address 'PingServer' beep
end
exit